package com.ruoyi.mateproduction.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.mateproduction.domain.MateAsepsis;
import com.ruoyi.mateproduction.domain.MateEthylene;
import com.ruoyi.mateproduction.mapper.MateEthyleneMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author
 * @Version 1.0
 */
@RestController
@RequestMapping("/ethylene")
public class MateEthyleneController extends BaseController {

    @Autowired
    MateEthyleneMapper mateEthyleneMapper;

    /*
  查询全部的环氧乙烷记录
   */
    @GetMapping("/selectEthyleneList")
    public TableDataInfo selectMateAsepsisList() {
        startPage();
        List<MateEthylene> mateEthylenes = mateEthyleneMapper.selectList(SecurityUtils.getDeptId());
        return getDataTable(mateEthylenes);
    }

    /*
   查询已经做完的无菌检验记录
    */
    @GetMapping("/selectEdit")
    public MateEthylene selectEdit(@RequestParam(value = "ethyleneId", required = false) Long ethyleneId) {
        MateEthylene mateEthylene = mateEthyleneMapper.selectEdit(ethyleneId);
        return mateEthylene;
    }

}
